package work.chief.utils;

import java.awt.*;
import java.awt.print.PrinterGraphics;
import java.util.List;

public class PageUtils<T> {
    //当前页
    private Integer currentPage;
    //单页量
    private Integer pageSize;
    //总记录数
    private Integer totalPageCount;
    //总页数
    private Integer totalPageSize;

    //展示的当前页的集合
    private List<T> list;

    public PageUtils() {
    }

    public PageUtils(Integer currentPage, Integer pageSize, Integer totalPageCount, Integer totalPageSize, List<T> list) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.totalPageCount = totalPageCount;
        this.totalPageSize = totalPageSize;
        this.list = list;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public Integer getTotalPageSize() {
        return totalPageSize;
    }

    public void setTotalPageSize(Integer totalPageSize) {
        this.totalPageSize = totalPageSize;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageUtils{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", totalPageCount=" + totalPageCount +
                ", totalPageSize=" + totalPageSize +
                ", list=" + list +
                '}';
    }
}
